package org.itboys.sms.entity;

import org.itboys.mongodb.entity.BaseLongIdEntity;

import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Index;
import org.mongodb.morphia.annotations.Indexes;

/**
 * 短信发送记录
 * @author 土豪章
 *
 */
@Entity(value = "SmsSendRecord", noClassnameStored = true)
@Indexes(value = {
		@Index(name = "mobileAndBizType", value = "mobile,bizType,sendTime")
		})
public class SmsSendRecord extends BaseLongIdEntity{

	private String mobile;
	private int bizType;//业务场景 1:会员注册 2:找回密码 等待 自己定常量
	private String code;//
	private long sendTime;//发送时间
	/**
	 * 关联的对象ID 视bizType来定 比如 bizType = 会员注册 则该对象为会员手机号
	 * 比如说 bizType = 找回密码 则该对象为 会员的ID.toString()
	 */
	private String relObjId;
	public String getMobile() {
		return mobile;
	}
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	public int getBizType() {
		return bizType;
	}
	public void setBizType(int bizType) {
		this.bizType = bizType;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public long getSendTime() {
		return sendTime;
	}
	public void setSendTime(long sendTime) {
		this.sendTime = sendTime;
	}
	public String getRelObjId() {
		return relObjId;
	}
	public void setRelObjId(String relObjId) {
		this.relObjId = relObjId;
	}
}
